How to know if a sorting algorithm is Unstable